package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	CouRseName  string  `gorm:"type:varchar(50);not null;comment:'课程名称'"`
	CouRsePrice float64 `gorm:"type:double(10,2);not null;comment:'课程价格'"`
	CouResInter string  `gorm:"type:varchar(255);not null;comment:'课程介绍'"`
}

func ShowByGoods(id int) (result *Goods, err2 error) {
	DB.Debug().Where("id = ?", id).Limit(1).Find(&result)
	return
}
